import request from '@/utils/request'

// 查询高职院校信息列表
export function listHSchools(query) {
  return request({
    url: '/edu/hSchools/list',
    method: 'get',
    params: query
  })
}

// 查询高职对应本科学校关系列表
export function listByDeptId(deptId) {
  return request({
    url: '/edu/hSchools/list/' + deptId,
    method: 'get'
  })
}

// 查询高职院校信息详细
export function getHSchools(schoolId) {
  return request({
    url: '/edu/hSchools/' + schoolId,
    method: 'get'
  })
}

export function getHSchoolTree(schoolId) {
  return request({
    url: '/edu/hSchools/tree/' + schoolId,
    method: 'get'
  })
}

export function getBSchoolTree(schoolId) {
  return request({
    url: '/edu/bSchools/tree/' + schoolId,
    method: 'get'
  })
}

// 新增高职院校信息
export function addHSchools(data) {
  return request({
    url: '/edu/hSchools',
    method: 'post',
    data: data
  })
}

// 修改高职院校信息
export function updateHSchools(data) {
  return request({
    url: '/edu/hSchools',
    method: 'put',
    data: data
  })
}

export function updateHBSchools(data) {
  return request({
    url: '/edu/hSchools/updateHBSchools',
    method: 'put',
    data: data
  })
}

// 删除高职院校信息
export function delHSchools(schoolId) {
  return request({
    url: '/edu/hSchools/' + schoolId,
    method: 'delete'
  })
}

// 导出高职院校信息
export function exportHSchools(query) {
  return request({
    url: '/edu/hSchools/export',
    method: 'get',
    params: query
  })
}